package com.example.springcloud.domain;

import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 用户订单对象 orders
 * 
 * @author hx
 * @date 2025-02-14
 */
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "用户订单对象")
@Data
public class Orders implements Serializable {
    private static final long serialVersionUID = 1L;

    /** 订单ID */
    @ApiModelProperty(value = "订单ID")
    private String orderId;

    /** 关联用户ID */
    @Excel(name = "关联用户ID")
    @ApiModelProperty(value = "关联用户ID")
    private Long userId;

    /** 关联商品ID */
    @Excel(name = "关联商品ID")
    @ApiModelProperty(value = "关联商品ID")
    private Long productId;

    /** 订单标题 */
    @Excel(name = "订单标题")
    @ApiModelProperty(value = "订单标题")
    private String title;

    /** 订单内容 */
    @Excel(name = "订单内容")
    @ApiModelProperty(value = "订单内容")
    private String content;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "创建时间")
    private Date createdAt;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("orderId", getOrderId())
            .append("userId", getUserId())
            .append("productId", getProductId())
            .append("title", getTitle())
            .append("content", getContent())
            .append("createdAt", getCreatedAt())
            .toString();
    }
}
